package com.alks.pad.commom.date.thread;

import com.alks.pad.commom.date.dto.PadUserTokenDto;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;



/**
 * @author:xxxxx
 * @Description: 记录用户id
 */
@Getter
@Setter
@NoArgsConstructor
public class PadUserIdThread {
    private final static  ThreadLocal<PadUserTokenDto> threadLocal = new ThreadLocal();

    public static PadUserTokenDto get() {
        return threadLocal.get();
    }

    public static void set(PadUserTokenDto value) {
        threadLocal.set(value);
    }

    public static void clear(){
        threadLocal.remove();
    }

}
